package org.gpp.proj1.bone;

import java.util.HashMap;
import java.util.Map;

import org.gpp.proj1.util.test.JMETestCase;

public class BoneStructureTest extends JMETestCase {

	/*
	 * Test method for 'org.gpp.proj1.bone.BoneStructure.BoneStructure(Bone, Map<String, Bone>, Map<String, Map<String, Bone>>)'
	 */
	public void testBoneStructure() {
		// Cannot create structure with null root bone
		try {
			new BoneStructure( null, null, null );
			fail();
		} catch( AssertionError e ) {
			// expected error
		}
		
		// Cannot create structure with null bone map
		try {
			new BoneStructure( new Bone("root"), null, null );
			fail();
		} catch( AssertionError e ) {
			// expected error
		}
		
		// Cannot create structure with null bone group map
		try {
			new BoneStructure( new Bone("root"), new HashMap<String, Bone>(), null );
			fail();
		} catch( AssertionError e ) {
			// expected error
		}
		
		// Valid construct
		try {
			new BoneStructure( new Bone("root"), new HashMap<String, Bone>(), new HashMap<String, Map<String, Bone>>() );
		} catch( AssertionError e ) {
			fail();
		}
	}

}
